package com.wswy.wzcx.model;

import android.support.annotation.ColorRes;
import android.support.annotation.DrawableRes;
import com.wswy.wzcx.R;

@Deprecated
public class CarColors {
  private static final ColorStyle[] COLOR_STYLES = {
      new ColorStyle(R.drawable.normal_banner_bg1_6rd,R.color.shadowColor,R.color.indicatorColor1,R.color.colorPrimary,R.drawable.normal_banner_bg1),
      new ColorStyle(R.drawable.normal_banner_bg2_6rd,R.color.shadowColor2,R.color.indicatorColor2,R.color.sign_tv_color2,R.drawable.normal_banner_bg2),
      new ColorStyle(R.drawable.normal_banner_bg3_6rd,R.color.shadowColor3,R.color.indicatorColor3,R.color.textSevereColor,R.drawable.normal_banner_bg3),
      new ColorStyle(R.drawable.normal_banner_bg4_6rd,R.color.shadowColor4,R.color.indicatorColor4,R.color.indicatorColor4,R.drawable.normal_banner_bg4)
  };

  public static ColorStyle getColorStyle(int position){
    int type = 0;
    if(position >= COLOR_STYLES.length){
      type = position % COLOR_STYLES.length;
    }else {
      type = position;
    }
    return COLOR_STYLES[type];
  }


  public static class ColorStyle{
    public @DrawableRes int bannerBgRes;
    public @ColorRes int shadowColor;
    public @ColorRes int indicatorColor;
    public @ColorRes int signTextColor;
    public @DrawableRes int normalBgRes;

    private ColorStyle(int bannerBgRes, int shadowColor, int indicatorColor,int signTextColor,int normalBgRes) {
      this.bannerBgRes = bannerBgRes;
      this.shadowColor = shadowColor;
      this.indicatorColor = indicatorColor;
      this.signTextColor = signTextColor;
      this.normalBgRes = normalBgRes;
    }
  }
}
